﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace DSkinTheme
{
    public class ListBoxItemTemplate : DSkin.Controls.DSkinListItemTemplate
    {
        private DSkin.DirectUI.DuiCheckBox duiCheckBox1;
        private DSkin.DirectUI.DuiButton duiButton1;
        private DSkin.DirectUI.DuiTrackBar duiTrackBar1;

        public ListBoxItemTemplate()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.duiCheckBox1 = new DSkin.DirectUI.DuiCheckBox();
            this.duiTrackBar1 = new DSkin.DirectUI.DuiTrackBar();
            this.duiButton1 = new DSkin.DirectUI.DuiButton();
            // 
            // duiCheckBox1
            // 
            this.duiCheckBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.duiCheckBox1.Checked = false;
            this.duiCheckBox1.CheckFlagColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(151)))), ((int)(((byte)(2)))));
            this.duiCheckBox1.CheckFlagColorDisabled = System.Drawing.Color.Gray;
            this.duiCheckBox1.CheckRectBackColorDisabled = System.Drawing.Color.Silver;
            this.duiCheckBox1.CheckRectBackColorHighLight = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(239)))), ((int)(((byte)(219)))));
            this.duiCheckBox1.CheckRectBackColorNormal = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(239)))), ((int)(((byte)(219)))));
            this.duiCheckBox1.CheckRectBackColorPressed = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(226)))), ((int)(((byte)(188)))));
            this.duiCheckBox1.CheckRectColor = System.Drawing.Color.DodgerBlue;
            this.duiCheckBox1.CheckRectColorDisabled = System.Drawing.Color.Gray;
            this.duiCheckBox1.CheckRectWidth = 14;
            this.duiCheckBox1.CheckState = System.Windows.Forms.CheckState.Unchecked;
            this.duiCheckBox1.DesignModeCanResize = false;
            this.duiCheckBox1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.duiCheckBox1.InnerPaddingWidth = 2;
            this.duiCheckBox1.InnerRectInflate = 3;
            this.duiCheckBox1.Location = new System.Drawing.Point(11, 7);
            this.duiCheckBox1.Name = "duiCheckBox1";
            this.duiCheckBox1.Size = new System.Drawing.Size(21, 18);
            this.duiCheckBox1.SpaceBetweenCheckMarkAndText = 3;
            this.duiCheckBox1.TextColorDisabled = System.Drawing.Color.Gray;
            // 
            // duiTrackBar1
            // 
            this.duiTrackBar1.AutoSize = false;
            this.duiTrackBar1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.duiTrackBar1.InnerPadding = 8;
            this.duiTrackBar1.IsEllipsePointButton = false;
            this.duiTrackBar1.Location = new System.Drawing.Point(139, 5);
            this.duiTrackBar1.MainLineBorderColor = System.Drawing.Color.Black;
            this.duiTrackBar1.MainLineBorderWidth = 1;
            this.duiTrackBar1.MainLineColorDown = System.Drawing.Color.White;
            this.duiTrackBar1.MainLineColorUp = System.Drawing.Color.Gray;
            this.duiTrackBar1.MainLineWidth = 5;
            this.duiTrackBar1.Maximum = 10;
            this.duiTrackBar1.Minimum = 0;
            this.duiTrackBar1.Name = "duiTrackBar1";
            this.duiTrackBar1.Orientation = System.Windows.Forms.Orientation.Horizontal;
            this.duiTrackBar1.PointButtonBorderColor = System.Drawing.Color.Black;
            this.duiTrackBar1.PointButtonBorderWidth = 1;
            this.duiTrackBar1.PointButtonHoverColor = System.Drawing.Color.White;
            this.duiTrackBar1.PointButtonHoverImage = null;
            this.duiTrackBar1.PointButtonNormalColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
            this.duiTrackBar1.PointButtonNormalImage = null;
            this.duiTrackBar1.PointButtonPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100)))));
            this.duiTrackBar1.PointButtonPressImage = null;
            this.duiTrackBar1.PointButtonSize = new System.Drawing.Size(9, 9);
            this.duiTrackBar1.Size = new System.Drawing.Size(100, 20);
            this.duiTrackBar1.Value = 0;
            // 
            // duiButton1
            // 
            this.duiButton1.ButtonStyle = DSkin.DirectUI.ButtonStyles.Style1;
            this.duiButton1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
            this.duiButton1.HoverColor = System.Drawing.Color.Empty;
            this.duiButton1.Location = new System.Drawing.Point(66, 3);
            this.duiButton1.Name = "duiButton1";
            this.duiButton1.PressColor = System.Drawing.Color.Empty;
            this.duiButton1.Size = new System.Drawing.Size(60, 26);
            this.duiButton1.Text = "编辑";
            this.duiButton1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // ListBoxItemTemplate
            // 
            this.Controls.Add(this.duiCheckBox1);
            this.Controls.Add(this.duiTrackBar1);
            this.Controls.Add(this.duiButton1);
            this.Size = new System.Drawing.Size(346, 35);
            this.IsSelectedChanged += new System.EventHandler(this.ListBoxItemTemplate_IsSelectedChanged);

        }

        private void ListBoxItemTemplate_IsSelectedChanged(object sender, EventArgs e)
        {
            if (IsSelected)
            {
                this.BackColor = Color.Gray;
            }
            else
            {
                this.BackColor = Color.Transparent;
            }
        }
    }
}
